package com.itheima.sh.controller;

import com.itheima.sh.pojo.Sku;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.itheima.sh.service.SkuService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * <p>
 * 商品表 前端控制器
 * </p>
 *
 * @author 古月撒么
 */
@RestController
@RequestMapping("sku")
public class SkuController {


    @Autowired
    private SkuService  skuService;
    @GetMapping
    public List findAll(){
        List<Sku> list = skuService.list();
        return list;
    }
}
